package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum ResideStasus implements HashID {

    DECORATED ("0", "已入住"),
    UNDECORATED("1", "未入住"),
    ;


    private final String id;
    private final String desc ;

    private ResideStasus(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    public static ResideStasus get(String desc) {
        ResideStasus[] resideStasuses = values();
        for (ResideStasus resideStasus : resideStasuses) {
            if (resideStasus.getDesc().equals(desc)) {
                return resideStasus;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
